package dissertation.extensions.generate.ejb.view;

import com.intellij.ui.DocumentAdapter;

import javax.swing.*;
import java.awt.*;

import static dissertation.common.constants.Constants.*;

public class CreateEJBPanel extends JPanel {
    private final JTextField inputJTextField;

    public CreateEJBPanel(DocumentAdapter documentAdapter) {
        inputJTextField = new JTextField();
        inputJTextField.setPreferredSize(new Dimension(150, 20));
        inputJTextField.getDocument().addDocumentListener(documentAdapter);
        add(new JLabel(CLASS_NAME_LABEL));
        add(inputJTextField);
    }

    public JTextField getInputJTextField() {
        return inputJTextField;
    }
}
